/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package afroschool.beans;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author AUTRES
 */
@Entity
@Table(name = "inscriptionetudiant")
@NamedQueries({@NamedQuery(name = "Inscriptionetudiant.findByNumero", query = "SELECT i FROM Inscriptionetudiant i WHERE i.numero = :numero"), @NamedQuery(name = "Inscriptionetudiant.findByCode", query = "SELECT i FROM Inscriptionetudiant i WHERE i.code = :code"), @NamedQuery(name = "Inscriptionetudiant.findByCodeannee", query = "SELECT i FROM Inscriptionetudiant i WHERE i.codeannee = :codeannee"), @NamedQuery(name = "Inscriptionetudiant.findById", query = "SELECT i FROM Inscriptionetudiant i WHERE i.id = :id"), @NamedQuery(name = "Inscriptionetudiant.findByIdPesonne", query = "SELECT i FROM Inscriptionetudiant i WHERE i.idPesonne = :idPesonne"), @NamedQuery(name = "Inscriptionetudiant.findByType", query = "SELECT i FROM Inscriptionetudiant i WHERE i.type = :type")})
public class Inscriptionetudiant implements Serializable {
    private static final long serialVersionUID = 1L;
    @Column(name = "numero")
    private Integer numero;
    @Id
    @Column(name = "code", nullable = false)
    private Integer code;
    @Column(name = "codeannee")
    private String codeannee;
    @Column(name = "id")
    private Integer id;
    @Column(name = "idPesonne")
    private Integer idPesonne;
    @Column(name = "type")
    private String type;

    public Inscriptionetudiant() {
    }

    public Inscriptionetudiant(Integer code) {
        this.code = code;
    }

    public Integer getNumero() {
        return numero;
    }

    public void setNumero(Integer numero) {
        this.numero = numero;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getCodeannee() {
        return codeannee;
    }

    public void setCodeannee(String codeannee) {
        this.codeannee = codeannee;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getIdPesonne() {
        return idPesonne;
    }

    public void setIdPesonne(Integer idPesonne) {
        this.idPesonne = idPesonne;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (code != null ? code.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Inscriptionetudiant)) {
            return false;
        }
        Inscriptionetudiant other = (Inscriptionetudiant) object;
        if ((this.code == null && other.code != null) || (this.code != null && !this.code.equals(other.code))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "afroschool.beans.Inscriptionetudiant[code=" + code + "]";
    }

}
